package cn.wolfcode.crm.mapper;

import cn.wolfcode.crm.domain.Operator;
import org.apache.ibatis.annotations.Param;

import java.util.Date;
import java.util.List;

public interface OperatorMapper {
    int deleteByPrimaryKey(Long id);

    int insert(Operator entity);

    Operator selectByPrimaryKey(Long id);

    List<Operator> selectAll();

    int updateByPrimaryKey(Operator entity);

    Operator queryByName(String username);

    void insertOperatorRole(@Param("operatorId") Long operatorId, @Param("roleId")Long roleId);

    void deleteOperatorRole(Long id);

    void updateLastLoginTime(@Param("date")Date date, @Param("id")Long id);

    void updateLoginCount(@Param("loginCount")int loginCount,  @Param("id")Long id);
}